<template>
	<view class="page page-fill">
		<form @submit="submit">
			<view class="page-block" style="margin-top: 20upx">
				<radio-group class="radio-sex" @change="sexChange">
					<label class="radio-single">
						<radio value="男" :checked="user.sex === '男'"/> 男
					</label>
					<label class="radio-single">
						<radio value="女" :checked="user.sex === '女'"/> 女
					</label>
				</radio-group>
			</view>		
			<button type="primary" form-type="submit" class="submitBtn">提交</button>
		</form>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				user: {}
			}
		},
		onLoad () {
			this.getGlobalUser();
		},
		onShow () {
			this.getGlobalUser();
		},
		methods: {
			
			getGlobalUser(){
				this.user = uni.getStorageSync(this.globalUser);
			},
			
			sexChange (e) {
				this.sex = e.detail.value
			},
			
			submit () {
				
			}
		}
	}
</script>

<style>
/* 页面铺满屏幕 */
.page-fill {
	width:100%;
	height: 100%;
	position: absolute;
}

.radio-sex {
	display: flex;
	flex-direction: column;
}

.radio-single {
	padding: 20upx 20upx;
}

.submitBtn {
	width: 95%;
	margin-top: 40upx;
}
</style>
